package com.jmb.waimao.service;

import java.util.Map;

/**
 * Mail Control Protocol (MCP) Email Service
 * Provides a standardized interface for sending emails with extended control features
 */
public interface MCPEmailService {
    
    /**
     * Send a simple email
     * 
     * @param to Recipient email address
     * @param subject Email subject
     * @param content Email content (can be HTML)
     * @return true if the email was sent successfully, false otherwise
     */
    boolean sendEmail(String to, String subject, String content);
    
    /**
     * Send an email with attachments
     * 
     * @param to Recipient email address
     * @param subject Email subject
     * @param content Email content (can be HTML)
     * @param attachments Map of attachment names to byte arrays
     * @return true if the email was sent successfully, false otherwise
     */
    boolean sendEmailWithAttachments(String to, String subject, String content, Map<String, byte[]> attachments);
    
    /**
     * Send a templated email
     * 
     * @param to Recipient email address
     * @param subject Email subject
     * @param templateId ID of the template to use
     * @param variables Variables to replace in the template
     * @return true if the email was sent successfully, false otherwise
     */
    boolean sendTemplatedEmail(String to, String subject, Long templateId, Map<String, Object> variables);
    
    /**
     * Get the status of the email service
     * 
     * @return A map containing status information
     */
    Map<String, Object> getStatus();
    
    /**
     * Configure the email service
     * 
     * @param config Configuration parameters
     * @return true if the configuration was successful, false otherwise
     */
    boolean configure(Map<String, Object> config);
}
